<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
    pageContext.setAttribute("PAGETITLE", "角色编辑");
%>
<%@ include file="/pages/include/header.jsp" %>

<script type="text/javascript">
<!--
$(document).ready(function () {
    var ar = $("#action_result");
    var i = parseInt(ar.html());
    if (0 < i) {
        ar.addClass("action_result_1");
        ar.html("操作成功");
    } else if (0 === i) {
        ar.addClass("action_result_0");
        ar.html("操作失败");
    }
    if (ar.html()) {
        $C.showTips({selector: "#action_result", position: $C.P_LEFT, hide: true});
    } else {
        $("#action_result").hide();
    }
});
//-->
</script>

<body>

    <div class="page_header">${PAGETITLE}</div>
    
    <div class="page_buttons">
        <div id="action_result" class="action_result">${requestScope.ACTION_RESULT}</div>
        <input type="button" onclick="$('#form').submit()"
            value="${empty form.map.form.roleId ? '保存' : '更新'}" />
    </div>

    <html:form action="/action/role" styleId="form">
        <input type="hidden" id="method" name="method"
            value="${empty form.map.form.roleId ? 'insert' : 'update'}" />
    
        <html:hidden property="form.roleId" />
        
        <table width="100%" cellpadding="0" cellspacing="0" align="center">
            <tr style="position: absolute; left: -5000px; top: -5000px;">
                <td width="20%"></td>
                <td width="80%"></td>
            </tr>
            <tr>
                <td class="label">角色名称：</td>
                <td class="value">
                    <html:text property="form.roleName" style="width: 98%;" />
                </td>
            </tr>
            <tr>
                <td class="label">状态：</td>
                <td class="value">
                    <html:select property="form.status">
                        <html:option value=""></html:option>
                        <html:option value="1">有效</html:option>
                        <html:option value="0">无效</html:option>
                    </html:select>
                </td>
            </tr>
            <tr>
                <td class="label">排序号：</td>
                <td class="value">
                    <html:text property="form.orderNo" styleClass="number" maxlength="7" />
                </td>
            </tr>
            <tr>
                <td class="label">备注：</td>
                <td class="textarea">
                    <html:textarea property="form.remark" style="width: 98%;" rows="5" />
                </td>
            </tr>
        </table>
    </html:form>
    
    <div class="page_footer"></div>

</body>

<%@ include file="/pages/include/footer.jsp" %>
